<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ajaxTest</title>
	<link rel="StyleSheet" href="../styles/util.css" type="text/css" />
	<script type="text/javascript" src="../scripts/coos.js"></script>
	<script type="text/javascript" src="../scripts/coos.ext.ajax.js"></script>
</head>
<body>
    <form action="" id="leaveMsgForm" name="leaveMsgForm" method="post" onsubmit="return false;">
	<table border="0" cellpadding="0" cellspacing="0" class="leaveMsg">
		<tr>
			<td colspan="2" valign="top" class="leaveMsgTD">
				<textarea id="leaveMsg" name="leaveMsg" class="leaveMsg_textarea">留言xxx</textarea>
			</td>
		</tr>
		<tr>
			<td align="left" valign="middle" width="115">
				<input type="checkbox" name="flag" value="1" />同时发一条微博
			</td>
			<td valign="top"><div onclick="leaveMessage();" class="leaveMsgBtn">&nbsp;</div></td>
		</tr>
	</table>
	</form>
</body>
<script type="text/javascript">
function leaveMessage()
{
	var form = coos.$id("leaveMsgForm");
	if(form.leaveMsg == "")
	{
		alert("请输入留言内容!");
	}
	var url = "ajaxTest.jsp";
	//coos.ajax.postText(url,leaveMessageCallback,form);
	coos.ajax.postText(url,leaveMessageCallback,form);
}
function leaveMessageCallback(responseText)
{
	alert(responseText);
}
</script>
</html>